<?php
/**
 * Created by PhpStorm.
 * User: tangchao
 * Date: 19-4-19
 * Time: 下午3:49
 */

namespace Lib\Db;

use Lib\IDataBase;

class MySQLi implements IDataBase
{
    protected $conn;

    function connect($host, $user, $passwd, $dbname)
    {
        $this->conn = mysqli_connect($host,$user,$passwd,$dbname);
    }

    function query($sql)
    {
        return mysqli_query($this->conn,$sql);
    }

    function close()
    {
        mysqli_close($this->conn);
    }
}